package com.juzipi.data.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.juzipi.data.mapper.TeacherMapper;
import com.juzipi.data.model.Teacher;
import com.juzipi.data.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author juzipi
 * @Date 2021/6/30 15:35
 * @Info
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements TeacherService {

    @Autowired
    private TeacherMapper teacherMapper;

    public Teacher getTeacherById(Long id){
        return teacherMapper.selectById(id);
    }

    @Override
    public void delete() {
        teacherMapper.deleteAll();
    }

    @Override
    public void midifyTeacher() {
        teacherMapper.updateTeacher();
    }

    @Override
    public List<Long> selectLimit(Integer limit,Integer offset) {
        return teacherMapper.selectSome(limit, offset);
    }

    @Override
    public List<Long> selectAllId() {
        return teacherMapper.selectAllId();
    }


}
